package cn.baiweigang.uu.msg;

import cn.baiweigang.uu.utils.LogUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

@Component
public class MsgPublisher {

    @Autowired
    ApplicationContext applicationContext;

    public void publish(PriceChangeEvent priceChangeEvent) {
        LogUtil.logDebug("开始发送消息 priceChangeEvent");
        LogUtil.logDebug(priceChangeEvent);
        applicationContext.publishEvent(priceChangeEvent);
    }

}
